#!/bin/bash
{
gcFile=$(ls -tr /mnt/GC*.log |tail -n1)
check_jvm="$(tail -n50 ${gcFile} |grep -a '\->'|tail -n1)"
fullGC=$(echo ${check_jvm} | grep -c 'Full')
} 2>/dev/null
if [[ ${fullGC} != 1 ]]; then
	echo "${check_jvm}" |awk -F'[][]|[K>]' '{print $10/$8*100}'
else
	echo "${check_jvm}" |awk -F'[][]|[K>]' '{print $16/$14*100}'
fi
